<?php 

session_start(); 
if(!isset($_POST['upload'])) { 
echo ' 
<form name="upload" enctype="multipart/form-data" method="POST" action="'.$_SERVER['REQUEST_URI'].'"> 
<input type="file" name="file" size="13" value=""> 
<br /><input type="submit" name="upload" value="Upload"> 
</form> 
'; 
} else { 
$yourdomain = 'http://testing.idealan.us/Control_Panel/members/'; 
$uploaddir = './'; 
$filename = $_FILES['file']['name']; 
$filesize = $_FILES['file']['size']; 
$tmpname_file = $_FILES['file']['tmp_name']; 
$date_file = date(imdy); 

move_uploaded_file($tmpname_file, "$uploaddir$date_file$filename"); 

echo "Successful.<br /><b>URL: </b><a href='".$yourdomain.$uploaddir.$date_file.$filename."' target='_blank'>LINK</a><br/><br/><br/><a href='test.php'>go back</a>"; 
} 
  
?>